* Apply to: Table A7 simqi.xlsx
* Description:  Figure A1 in the OA

clear

set more off


* Democratic respondents

clear

import excel "...\1805 Roadmaps\Table A7 simqi.xlsx", sheet("Sheet1") firstrow

drop if model==.
drop if model > 2

* Create black values to facilitate bar spacing

set obs 8
replace model = 1 in 8
replace treatment = "blank1" in 8
replace estimate = 0 in 8
replace change = 0 in 8


* Create order term

gen order1 = 0
replace order1 = 1 if treatment=="control" & group=="any"
replace order1 = 2 if treatment=="allinfo"
replace order1 = 3 if treatment=="blank1"
replace order1 = 4 if treatment=="control" & group=="all"
replace order1 = 5 if treatment=="guide"
replace order1 = 6 if treatment=="party"
replace order1 = 7 if treatment=="perspat"
replace order1 = 8 if treatment=="perpty"


sort order1


* Figure A1a (First Difference Spatial Advantage)

graph bar change if model!=., ///
     over(order1, label(nolabels)) ///
     asyvars bargap(0) ylabel(-.30(.10).63) legend(off) ///
	 ytitle("") ///
	 yline(0, lcolor(black)) ///
	 bar(1, lcolor(black) bcolor(gs16)) ///
	 bar(2, lcolor(black) bcolor(gs0)) ///
	 bar(4, lcolor(black) bcolor(gs16)) ///
	 bar(5, lcolor(black) bcolor(gs6)) ///
	 bar(6, lcolor(black) bcolor(gs12)) ///
	 bar(7, lcolor(black) bcolor(gs0)) ///
	 bar(8, lcolor(black) bcolor(gs4)) ///
	 text(-.16 8 "{bf:-.04}", size(large)) ///
	 text(.37 20.5 "{bf:.25 *}{superscript:a}", size(large)) ///
	 text(-.15 44.5 "{bf:-.03}", size(large)) ///
	 text(.39 57 "{bf:.27 *}{superscript:a}", size(large)) ///
	 text(.37 67.5 "{bf:.25 *}{superscript:a}", size(large)) ///
	 text(.37 80 "{bf:.25 *}{superscript:a}", size(large)) ///
	 text(.30 92.5 "{bf:.18 *}", size(large)) ///
	 text(-.43 8 "{bf:Control}" " ") ///
	 text(-.43 19.5 "{bf:Any}" "{bf:Info}") ///
	 text(-.43 43.5 "{bf:Control}" " ") ///
	 text(-.43 56 "{bf:Voter}" "{bf:Guide}") ///
	 text(-.43 67.5 "{bf:Party}" "{bf:Cues}") ///
	 text(-.43 80 "{bf:Spatial}" "{bf:Map}") ///
	 text(-.43 92.5 "{bf:Party +}" "{bf:Map}") ///
	 intensity(*0.9) scheme(s1color) ///
	 note(" " " " " ") ///
     graphregion(color(white)) plotregion(color(white))


* Figure A1b (Predicted Probability Support Moderate)

graph bar estimate if model!=., ///
     over(order1, label(nolabels)) ///
     asyvars bargap(0) ylabel(0(.10).93) legend(off) ///
	 ytitle("") ///
	 bar(1, lcolor(black) bcolor(gs16)) ///
	 bar(2, lcolor(black) bcolor(gs0)) ///
	 bar(4, lcolor(black) bcolor(gs16)) ///
	 bar(5, lcolor(black) bcolor(gs6)) ///
	 bar(6, lcolor(black) bcolor(gs12)) ///
	 bar(7, lcolor(black) bcolor(gs0)) ///
	 bar(8, lcolor(black) bcolor(gs4)) ///
	 text(.36 8 "{bf:.24}", size(large)) ///
	 text(.34 20.5 "{bf:.22}", size(large)) ///
	 text(.36 44.5 "{bf:.24}", size(large)) ///
	 text(.43 57 "{bf:.31}", size(large)) ///
	 text(.23 67.5 "{bf:.11 #}", size(large)) ///
	 text(.37 80 "{bf:.25}", size(large)) ///
	 text(.32 92.5 "{bf:.20}", size(large)) ///
	 text(-.08 8 "{bf:Control}" " ") ///
	 text(-.08 19.5 "{bf:Any}" "{bf:Info}") ///
	 text(-.08 43.5 "{bf:Control}" " ") ///
	 text(-.08 56 "{bf:Voter}" "{bf:Guide}") ///
	 text(-.08 67.5 "{bf:Party}" "{bf:Cues}") ///
	 text(-.08 80 "{bf:Spatial}" "{bf:Map}") ///
	 text(-.08 92.5 "{bf:Party +}" "{bf:Map}") ///
	 intensity(*0.9) scheme(s1color) ///
	 note(" " " " " ") ///
     graphregion(color(white)) plotregion(color(white))

* End
